import request from '@/utils/request'
import http from '@/utils/http'
import { getUserId } from "@/utils/auth";
import Axios from 'axios';

//获员工列表
export async function getUserListApi(params) {
  return await http.get("/api/user/list", params)
}

//新增员工


export async function addStudent(parm) {
  return await http.post("/api/user", parm)
}

//编辑员工
export async function editUserApi(param) {
  return await http.put("/api/user", param)
}
//删除员工
export async function deleteUserApi(param) {
  return await http.delete("/api/user", param)
}





//获取用户信息
export async function getUserApi(param) {
  return await http.get("/common/user", param)
}

export async function login(param) {
  return await http.post("/user/login", param)
}

export async function logout() {
  return await http.post("/user/logout")
}

export async function addUser(parm) {
  return await http.post("/user", parm)
}

export async function bindClassApi(parm) {
  return await http.post("/user/bind", parm)
}

export async function getSubjectListApi(parm) {
  return await http.get("/common/subject", parm)
}

export async function getClassListApi(parm) {
  return await http.get("/common/getAllClass", parm)
}

export async function updatePasswordApi(parm) {
  return await http.post("/user/updatePassword", parm)
}

export async function resetPasswordApi(params) {
  return await http.get("/user/resetPassword", {id:params})
}



